summaryrefslogtreecommitdiff
path: root/src/pages/blogs/[...slug].astro
blob: 417d1a6a29c31f7788aecabd695427f851b83399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
import Markdown from "../../components/MarkdownB.astro";
import { getCollection } from "astro:content";

export async function getStaticPaths() {
  const blogEntries = await getCollection("blogs");
  return blogEntries.map((entry) => ({
    params: { slug: entry.slug },
    props: { entry },
  }));
}

const { entry } = Astro.props;
const { Content } = await entry.render();
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="description" content="Astro description" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="generator" content={Astro.generator} />
    <title>Test</title>
  </head>
  <body>
    <main>
      <Markdown><Content /></Markdown>
    </main>
  </body>
</html>